import { getDataApi } from "@/api/data-quality";
import { ref } from 'vue'
export default function cachesApi() {
    const treeData = ref([]);
    const param = {
        orderByColumn: "",
        isAsc: "asc",
        issync: "1",
    }
    const getTreeData = async () => {
        let data: any = await getDataApi(param);
        data.rows.forEach((e: any) => {
            Object.assign(e, { key: e.id, name: e.sjdxms })
        });
        treeData.value = data.rows;
        return treeData.value;
    }
    return {
        getTreeData,
        treeData
    };
};